


# 读取文档ID属性的示例代码
def read_document_id(file_path):
    """
    读取文件的文档ID属性
    
    Args:
        file_path (str): 文件路径
    
    Returns:
        str: 文档ID值，如果不存在则返回None
    """
    try:
        doc_id_stream_path = file_path + ":DocumentID"
        with open(doc_id_stream_path, 'r') as stream_file:
            return stream_file.read()
    except Exception as e:
        print(f"无法读取文档ID属性: {e}")
        return None

# 使用示例
# doc_id = read_document_id("path/to/your/file.sql")
# print(f"文档ID: {doc_id}")

if __name__ == "__main__":
    file_path = "H:\\COMPANY\\xwork\\SQL\\00.MYWORK-ERP-WORKING\\20250904_FENG\\15.lp_app_qrycardreceives.sql"
    doc_id = read_document_id(file_path)
    print(f"文档ID: {doc_id}")